package ch.fusun.baron.turn;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.core.rmi.User;
import ch.fusun.baron.data.DataUpdate;

public class SetPointsDataUpdate implements DataUpdate {

	private User user;
	private int points;
	@Inject
	private transient UserTurnService userTurnService;

	/**
	 * Kryo
	 */
	public SetPointsDataUpdate() {
	}

	/**
	 * @param user
	 * @param points
	 */
	public SetPointsDataUpdate(User user, int points) {
		this.user = user;
		this.points = points;
	}

	@Override
	public void update() {
		userTurnService.setPoints(user, points);
	}

}
